@(id: Long, choixForm: Form[Choix])
@header()

@import helper._

@implicitFieldConstructor = @{ FieldConstructor(twitterBootstrapInput.render) } 

@main("createChoix") {
	  
    @form(routes.AdminChoix.updateChoix(id)) {
    	<div class="bs-docs-example" >
    	
    	<div class="bs-docs-example-after" >
    	Etape 1 sur 1
    	</div>
     
     	<legend> Modifier un choix </legend>
     	
        <fieldset>
        <br>
        @select(
                choixForm("question.idQuestion"), 
                options(Question.options), 
                '_label -> "Question a laquelle il faut rajouter le choix ", '_default -> "-- Choisir une question --",
                '_showConstraints -> false
            )
        
            @inputText(choixForm("descriptifChoix"), '_label -> "Descriptif du choix")
                       
    		@input(
    				choixForm("estVrai"),
    				'_label -> "Reponse du choix", '_showConstraints -> false) { (_, name, value, _) =>
    	        <SELECT type="text" name="@name">
    	        	<OPTION>--</OPTION>
    	        	<OPTION value="true"> Vrai</OPTION>
    				<OPTION value="false"> Faux</OPTION>
    			</SELECT>
    	    }     

        </fieldset>
            
            
            
        <br>
        
        <div class="actions">
        <a href="@routes.AdminChoix.indexChoix()" class="btn btn-primary"><i class="icon-white icon-circle-arrow-left"></i> Retour</a>
    	<button type="submit" class="btn btn-primary"> Enregistrer <i class="icon-white icon-circle-arrow-right"></i> </button>
        </div>
       </div>
    }
    
    @form(routes.AdminChoix.deleteChoix(id), 'class -> "topRight") {
            <input type="submit" value="Supprimer ce choix" class="btn danger">
    }
    
}